Image data has a huge amount of information. Therefore, reduction in the load on networks and decrease in the pressure on recording media have generally been pursued by compressing image data and decreasing the amount of information. In recent years, in accordance with the spread and standardization of portable document format (PDF), a format in which images can be represented with a multilayer structure can be used by general users. By using the multilayer structure, as described in Japanese Patent Application Laid-open No. H11-177977), image data of document images that natural images and text images are mixed can be efficiently compressed as maintaining image qualities. Such image representation is called mixed raster content (MRC). In MRC, it is usual to represent image data that is a compression target with three layers that are a foreground image layer with low resolution, a background image layer with low resolution, and a foreground musk layer with high resolution. Also, in order to decrease the effect of information loss due to decrease in resolution, when the foreground image layer and background image layer are generated, a method is commonly used. In the method, the image data of the compression target is separated to image data of the foreground image layer and image data of the background image layer without temporarily changing their resolution, and the decrease in resolution is performed later.
However, in the conventional method, image data of the foreground image layer and image data of background image layer are generated without changing their resolutions and the image data of both of the layers is held so that large buffer is required. As a result, there is a problem that a circuit capacity becomes huge.
In order to solve the problem, an object of the present invention is to enable image data to be compressed with a small circuit while a large buffer is not required.
An image processing apparatus disclosed in the application includes: an attribute image generation part that analyses image data of an original image and generates image data of an attribute image for each pixel, the attribute image having a first attribute value that shows whether or not a pixel is attributed to a predetermined first part image; a compression image generation part that, by dividing the image data of the original image into a plurality of unit blocks each of which has a plurality of pixels, by referring to the image data of the attribute image and by changing pixel values of the plurality of pixels included in each of the plurality of unit blocks to a pixel value of one pixel, generates image data of a first compression image that includes a compression image of the first part image and image data of a second compression image that includes a compression image of a second part image that is other part of the original image than the first part image; and a format part that generates, based on the image data of the attribute image, image data that shows the first attribute value for each pixel as selection data, the selection data being used to select a pixel value of each pixel from the image data of the first compression image and the image data of the second compression image, and generates data in a multilayer data format that includes the selection data, the image data of the first compression image and the image data of the second compression image.
An image processing method includes an attribute image generation part that analyses image data of an original image and generates image data of an attribute image for each pixel, the attribute image having a first attribute value that shows whether a pixel is attributed to a predetermined first part image; an image generation process that, by dividing the image data of the original image into a plurality of unit blocks each of which has a plurality of pixels, by referring to the image data of the attribute image, and by changing pixel values of the plurality of pixels included in each of the plurality of unit blocks to a pixel value of one pixel, generates image data of a first compression image that includes a compression image of the first part image and image data of a second compression image that includes a compression image of a second part image that is other part of the original image than the first part image; and a format process that generates image data that shows the first attribute value for each pixel as selection data based on the image data of the attribute image, the selection data being used to select a pixel value of each pixel from the image data of the first compression image and the image data of the second compression image, and generates data in a multilayer data format that includes the selection data, the image data of the first compression image, and the image data of the second compression image.
According to one embodiment of the present invention, it is possible to compress image data with a small circuit while a large buffer is not required.